package com.project.bean;

import java.time.LocalDate;
@SuppressWarnings("all")
/**
 * 评论实体类
 */
public class CommentBean {
    /** 编号*/
    private int id;
    /** 回帖的标题*/
    private String name;
    /** 评论的内容*/
    private String content;
    /** 评论的用户*/
    private UserBean user;
    /** 发布的时间*/
    private LocalDate date = LocalDate.now();
    /** 评论的主题*/
    private ThemeBean theme;

    public CommentBean() {
    }

    public CommentBean(String name, String content, Integer userId, Integer themeId) {
        this.name = name;
        this.content = content;
        this.user = new UserBean();
        this.user.setId(userId);
        this.theme = new ThemeBean();
        this.theme.setId(themeId);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public ThemeBean getTheme() {
        return theme;
    }

    public void setTheme(ThemeBean theme) {
        this.theme = theme;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "CommentBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", content='" + content + '\'' +
                ", user=" + user +
                ", date=" + date +
                ", theme=" + theme +
                '}';
    }
}
